package com.jysz.certificate.persistence.enums.mytask;


public enum Prwarningtype {
	User("绩效人员名单", 0), ARRIVE("预计到店", 1), DRAFT("汇票到期日期", 2),TREATY("协议到期日",3),PERCENTAGE("绩效确认",4);

	// 名称
	private String name;
	// 索引
	private int index;

	private Prwarningtype(String name, int index) {
		this.name = name;
		this.index = index;
	}

	// 根据索引获得名称
	public static String getName(int index) {
		for (Prwarningtype r : Prwarningtype.values()) {
			if (r.getIndex() == index) {
				return r.name;
			}
		}
		return null;
	}

	public static Prwarningtype index(int index) {
		for (Prwarningtype r : Prwarningtype.values()) {
			if (r.getIndex() == index) {
				return r;
			}
		}
		return null;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getIndex() {
		return index;
	}

	public void setIndex(int index) {
		this.index = index;
	}

}
